﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ExportToRTR.CApExportToRTRCollision
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll


namespace DnProcessSimulateCommands.ExportToRTR{

internal class CApExportToRTRCollision : ICApExportToRTRWriteable
{
  public string m_name;
  public CApExportToRTROrigin m_origin;
  public CApExportToRTRGeometry m_geometry;

  public CApExportToRTRCollision(
    CApExportToRTRGeometry geometry,
    string name = null,
    CApExportToRTROrigin origin = null)
  {
    this.m_name = name;
    this.m_origin = origin;
    this.m_geometry = geometry;
  }

  public void Write(CApExportToRTRXmlWriter writer)
  {
    writer.WriteStartElement("collision");
    if (this.m_name != null)
      writer.WriteAttributeString("name", this.m_name);
    this.m_origin?.Write(writer);
    this.m_geometry?.Write(writer);
    writer.WriteEndElement();
  }
}
